import {Component} from "react";
export default class Home extends Component{
    constructor(){
        super();
    }

    render(){
        return (
            <div>
                <Header name="我是组件Header的name属性"/>
            </div>
        )
    }
}


class Header extends Component{
    constructor(){
        super();
        console.log("这个 props 是什么:");
        console.log(this.props);
        // this.attrs = props;
    }

    render(){
        console.log("俩props相等吗?");
        console.log(this.attrs===this.props);
        return (
            <div>
                {this.props.name}
            </div>
        )
    }
}